home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / MAK3791B.ZIP / man / cat1 / make.1
Encoding:
Text File  |  2000-07-14  |  10.0 KB  |  265 lines

  1.  
  2.  
  3.  
  4. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  5.  
  6.  
  7. NNAAMMEE
  8.        make - GNU make utility to maintain groups of programs
  9.  
  10. SSYYNNOOPPSSIISS
  11.        mmaakkee [ --ff _m_a_k_e_f_i_l_e ] [ option ] ...  target ...
  12.  
  13. WWAARRNNIINNGG
  14.        This  man  page  is an extract of the documentation of _G_N_U
  15.        _m_a_k_e _.  It is updated only occasionally, because  the  GNU
  16.        project  does  not use nroff.  For complete, current docu-
  17.        mentation, refer to the Info file mmaakkee..iinnffoo which is  made
  18.        from the Texinfo source file mmaakkee..tteexxiinnffoo.
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.        The  purpose of the _m_a_k_e utility is to determine automati-
  22.        cally which pieces of a large program need  to  be  recom-
  23.        piled, and issue the commands to recompile them.  The man-
  24.        ual describes the GNU implementation of  _m_a_k_e,  which  was
  25.        written by Richard Stallman and Roland McGrath.  Our exam-
  26.        ples show C programs, since they are most common, but  you
  27.        can  use _m_a_k_e with any programming language whose compiler
  28.        can be run with a shell command.  In  fact,  _m_a_k_e  is  not
  29.        limited  to programs.  You can use it to describe any task
  30.        where some files must be updated automatically from others
  31.        whenever the others change.
  32.  
  33.        To  prepare  to use _m_a_k_e, you must write a file called the
  34.        _m_a_k_e_f_i_l_e that describes the relationships among  files  in
  35.        your  program,  and  the  states the commands for updating
  36.        each file.  In a program, typically the executable file is
  37.        updated  from object files, which are in turn made by com-
  38.        piling source files.
  39.  
  40.        Once a suitable makefile exists, each time you change some
  41.        source files, this simple shell command:
  42.  
  43.               mmaakkee
  44.  
  45.        suffices  to  perform  all  necessary recompilations.  The
  46.        _m_a_k_e program uses the makefile data base and the last-mod-
  47.        ification  times of the files to decide which of the files
  48.        need to be updated.  For each of those  files,  it  issues
  49.        the commands recorded in the data base.
  50.  
  51.        _m_a_k_e  executes  commands  in the _m_a_k_e_f_i_l_e to update one or
  52.        more target _n_a_m_e_s, where _n_a_m_e is typically a program.   If
  53.        no  --ff option is present, _m_a_k_e will look for the makefiles
  54.        _G_N_U_m_a_k_e_f_i_l_e, _m_a_k_e_f_i_l_e, and _M_a_k_e_f_i_l_e, in that order.
  55.  
  56.        Normally you should call your makefile either _m_a_k_e_f_i_l_e  or
  57.        _M_a_k_e_f_i_l_e.   (We  recommend  _M_a_k_e_f_i_l_e  because  it  appears
  58.        prominently near the beginning  of  a  directory  listing,
  59.        right  near  other  important  files such as _R_E_A_D_M_E.)  The
  60.        first name checked, _G_N_U_m_a_k_e_f_i_l_e, is  not  recommended  for
  61.  
  62.  
  63.  
  64. GNU                       22 August 1989                        1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  71.  
  72.  
  73.        most  makefiles.   You  should use this name if you have a
  74.        makefile that is specific to GNU _m_a_k_e,  and  will  not  be
  75.        understood by other versions of _m_a_k_e.  If _m_a_k_e_f_i_l_e is `-',
  76.        the standard input is read.
  77.  
  78.        _m_a_k_e updates a target if it depends on prerequisite  files
  79.        that  have  been  modified since the target was last modi-
  80.        fied, or if the target does not exist.
  81.  
  82. OOPPTTIIOONNSS
  83.        --bb
  84.  
  85.        --mm   These options  are  ignored  for  compatibility  with
  86.             other versions of _m_a_k_e.
  87.  
  88.        --CC _d_i_r
  89.             Change  to directory _d_i_r before reading the makefiles
  90.             or doing anything else.  If multiple --CC  options  are
  91.             specified, each is interpreted relative to the previ-
  92.             ous one: --CC / --CC etc is equivalent to --CC /etc.   This
  93.             is typically used with recursive invocations of _m_a_k_e.
  94.  
  95.        --dd   Print debugging information  in  addition  to  normal
  96.             processing.   The  debugging  information  says which
  97.             files are being considered for remaking, which  file-
  98.             times are being compared and with what results, which
  99.             files actually need  to  be  remade,  which  implicit
  100.             rules  are  considered and which are applied---every-
  101.             thing interesting about how _m_a_k_e decides what to  do.
  102.  
  103.        --ee   Give  variables taken from the environment precedence
  104.             over variables from makefiles.
  105.  
  106.        --ff _f_i_l_e
  107.             Use _f_i_l_e as a makefile.
  108.  
  109.        --ii   Ignore all errors  in  commands  executed  to  remake
  110.             files.
  111.  
  112.        --II _d_i_r
  113.             Specifies  a  directory  _d_i_r  to  search for included
  114.             makefiles.  If several --II options are used to specify
  115.             several  directories, the directories are searched in
  116.             the order specified.  Unlike the arguments  to  other
  117.             flags  of  _m_a_k_e,  directories given with --II flags may
  118.             come directly after the flag: --II_d_i_r  is  allowed,  as
  119.             well  as --II _d_i_r_.  This syntax is allowed for compati-
  120.             bility with the C preprocessor's --II flag.
  121.  
  122.        --jj _j_o_b_s
  123.             Specifies the number of jobs (commands) to run simul-
  124.             taneously.   If there is more than one --jj option, the
  125.             last one is effective.  If the  --jj  option  is  given
  126.             without  an  argument, _m_a_k_e will not limit the number
  127.  
  128.  
  129.  
  130. GNU                       22 August 1989                        2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  137.  
  138.  
  139.             of jobs that can run simultaneously.
  140.  
  141.        --kk   Continue as much as possible after an  error.   While
  142.             the  target that failed, and those that depend on it,
  143.             cannot be remade, the  other  dependencies  of  these
  144.             targets can be processed all the same.
  145.  
  146.        --ll
  147.  
  148.        --ll _l_o_a_d
  149.             Specifies  that  no  new  jobs  (commands)  should be
  150.             started if there are others jobs running and the load
  151.             average  is  at least _l_o_a_d (a floating-point number).
  152.             With no argument, removes a previous load limit.
  153.  
  154.        --nn   Print the commands that would be executed, but do not
  155.             execute them.
  156.  
  157.        --oo _f_i_l_e
  158.             Do  not remake the file _f_i_l_e even if it is older than
  159.             its dependencies,  and  do  not  remake  anything  on
  160.             account  of changes in _f_i_l_e.  Essentially the file is
  161.             treated as very old and its rules are ignored.
  162.  
  163.        --pp   Print the data base (rules and variable values)  that
  164.             results  from  reading the makefiles; then execute as
  165.             usual or as otherwise specified.   This  also  prints
  166.             the  version  information given by the --vv switch (see
  167.             below).  To print the data  base  without  trying  to
  168.             remake any files, use mmaakkee --pp --ff_/_d_e_v_/_n_u_l_l_.
  169.  
  170.        --qq   ``Question mode''.  Do not run any commands, or print
  171.             anything; just return an exit status that is zero  if
  172.             the specified targets are already up to date, nonzero
  173.             otherwise.
  174.  
  175.        --rr   Eliminate use of the built-in implicit  rules.   Also
  176.             clear  out  the  default  list of suffixes for suffix
  177.             rules.
  178.  
  179.        --ss   Silent operation; do not print the commands  as  they
  180.             are executed.
  181.  
  182.        --SS   Cancel  the  effect  of the --kk option.  This is never
  183.             necessary except in a recursive _m_a_k_e where  --kk  might
  184.             be inherited from the top-level _m_a_k_e via MAKEFLAGS or
  185.             if you set --kk in MAKEFLAGS in your environment.
  186.  
  187.        --tt   Touch files (mark them  up  to  date  without  really
  188.             changing  them)  instead  of  running their commands.
  189.             This is used to pretend that the commands were  done,
  190.             in order to fool future invocations of _m_a_k_e.
  191.  
  192.        --vv   Print   the  version  of  the  _m_a_k_e  program  plus  a
  193.  
  194.  
  195.  
  196. GNU                       22 August 1989                        3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  203.  
  204.  
  205.             copyright, a list of authors and a notice that  there
  206.             is no warranty.
  207.  
  208.        --ww   Print  a  message  containing  the  working directory
  209.             before and after other processing.  This may be  use-
  210.             ful  for  tracking down errors from complicated nests
  211.             of recursive _m_a_k_e commands.
  212.  
  213.        --WW _f_i_l_e
  214.             Pretend that the target _f_i_l_e has just been  modified.
  215.             When used with the --nn flag, this shows you what would
  216.             happen if you were to modify that file.  Without  --nn,
  217.             it  is  almost the same as running a _t_o_u_c_h command on
  218.             the given file before running _m_a_k_e, except  that  the
  219.             modification  time is changed only in the imagination
  220.             of _m_a_k_e.
  221.  
  222. SSEEEE AALLSSOO
  223.        _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l
  224.  
  225. BBUUGGSS
  226.        See the chapter `Problems and Bugs' in _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l
  227.        _.
  228.  
  229. AAUUTTHHOORR
  230.        This  manual  page contributed by Dennis Morse of Stanford
  231.        University.  It has been reworked by Roland McGrath.
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. GNU                       22 August 1989                        4
  263.  
  264.  
  265.